home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
amigan
/
amigan 10
/
intuilib
/
screen.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-27
|
1KB
|
57 lines
#include <graphics/gfxbase.h>
#include <intuition/intuition.h>
struct IntuitionBase *IntuitionBase;
struct GfxBase *GfxBase;
struct Screen *scr, *OpenScreen();
struct RastPort *rp;
struct ViewPort *vp;
long GetMsg();
struct NewScreen scrdef = {
0, 0, 0, 0,
0, /* 16 colors */
0, 1, /* detail/block pens */
/* "Automatically" set up screen format */
NULL,
CUSTOMSCREEN,
NULL, NULL, NULL, NULL /* no special font, title, gadg, or bitmap */
};
long screen (x,y,x1,y1,t,d)
long x,y,x1,y1,d,t;
{
char *OpenLibrary();
int q;
q=0;
if ((t & 1)==1) q=HIRES;
if ((t & 2)==2) q=(q | LACE);
if ((t & 4)==4) q=(q | SPRITES);
if ((t & 8)==8) q=(q | DUALPF);
if ((t & 16)==16) q=(q | HAM);
scrdef.LeftEdge = x;
scrdef.TopEdge =y;
scrdef.Depth=d;
scrdef.Width=x1;
scrdef.Height=y1;
scrdef.ViewModes = q;
if (!(IntuitionBase = (struct IntuitionBase *)
OpenLibrary ("intuition.library", 1L))) {
exit (FALSE);
}
if (!(GfxBase = (struct GfxBase *)
OpenLibrary ("graphics.library", 1L))) {
exit (FALSE);
}
if (!(scr = OpenScreen (&scrdef))) {
exit (FALSE);
}
return (scr);
}